Static Config class
Grabs the FederationConfigurationCreated Event and creates a custom configuration.
Properties
public static string AudienceUri { get; set; }
public static string Realm { get; set; }
public static string FederationMetadataLocation { get; set; }
public static ActionResourceClaimAuthorizationManager AuthorizationManager { get; set; }
public static ClaimsAuthenticationManager Transformer { get; set; }
public static AuthenticationMode[] AuthenticationModes { get; set; }
public static IStsServerConfiguration StsConfiguration { get; set; }
ActionResourceClaimAuthorizationManager
ClaimsAuthenticationManagerMethods
public static void ConfigureIdentity(AuthenticationMode[] authenticationModes,
ActionResourceClaimAuthorizationManager arcam,
ClaimsAuthenticationManager transformer,
IStsServerConfiguration serverConfiguration)
Example Use
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
var amodes = new[] { AuthenticationMode.ad };
var environmentLevel = LocalSettings.EnvironmentLevel;
FDOTStsConfig stsServerName;
if (environmentLevel == EnvironmentLevel.WorkstationOrUnknown)
stsServerName=FDOTStsConfig.DeveloperToUnit;
else if (environmentLevel == EnvironmentLevel.Production)
stsServerName = FDOTStsConfig.ProductionSTS;
else if (environmentLevel == EnvironmentLevel.SystemTest)
stsServerName = FDOTStsConfig.SystemSTS;
else
stsServerName = FDOTStsConfig.UnitSTS;
var stsServerConfig = StsClientEnvironmentConfig.TransformForServerConfiguration(stsServerName);
ClaimsIdentityConfig.ConfigureIdentity(amodes, new MyActionResourceClaimAuthorizationManager(),
new MyClaimsTransformer(), stsServerConfig);
}